package com.yootk.listener;

import com.yootk.event.YootkEvent;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * 事件监听处理类
 */
@Slf4j
//@Component
public class YootkListener implements ApplicationListener<YootkEvent> {

    // 事件处理
    @Override
    public void onApplicationEvent(YootkEvent event) {
        log.info("事件处理：{}", event);
        event.fire();
    }
}
